package com.gaoyi.basemodule.basedao;

import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Update;

import java.util.List;

public abstract class BaseDao<T> {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    public abstract void inserts(List<T> data);

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    public abstract void insert(T... data);

    @Update(onConflict = OnConflictStrategy.REPLACE)
    public abstract void update(T... data);

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    public abstract void update(List<T> data);

    @Delete
    public abstract void deletes(List<T> data);

    @Delete
    public abstract void delete(T... data);
}
